<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>mybatis-plus代码生成</title>

        <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.4.1/dist/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
        <script src="https://cdn.jsdelivr.net/npm/jquery@3.4.1/dist/jquery.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
        <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
        <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.4.1/dist/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
    </head>

    <body>
        <div class="container">

            <div class="row">
                <div>为每一个表生成以下东西：</div>
                <ul>
                    <li>一个实体类</li>
                    <li>一个mapper接口、一个mapper xml文件(也可以不生成)</li>
                    <li>一个服务层接口、一个服务层接口的实现类</li>
                    <li>一个控制器</li>
                </ul>
            </div>

            <br/>
            <hr color="#000"/>
            <br/>

            <div class="row">
                <div>注意：</div>
                <ul>
                    <li>生成的mapper接口没有添加 <kbd>@Repository</kbd> 注解与 <kbd>@Mapper</kbd> 注解</li>
                    <li>生成的服务层接口实现类加了<kbd>@Service</kbd> 注解，但没显式指定bean的名称</li>
                </ul>
            </div>

            <br/>
            <hr color="#000"/>
            <br/>

            <form method="POST" action="/geneCode">
                <div class="form-group row">
                    <label for="PARENT_PACKAGE" class="col-sm-2 col-form-label">PARENT_PACKAGE</label>
                    <div class="col-sm-10">
                        <input name="parentPackage" type="text" class="form-control" id="PARENT_PACKAGE" placeholder="输入 PARENT_PACKAGE" required/>
                    </div>
                </div>

                <div class="form-group row">
                    <label for="MODULE_NAME" class="col-sm-2 col-form-label">模块名</label>
                    <div class="col-sm-10">
                        <input name="moduleName" type="text" class="form-control" id="MODULE_NAME" placeholder="输入模块名" required/>
                    </div>
                </div>

                <div class="form-group row">最后类所有在包是：<code>PARENT_PACKAGE</code>/<code>模块名</code></div>

                <div class="form-group row">
                    <label for="db_host" class="col-sm-2 col-form-label">主机</label>
                    <div class="col-sm-10">
                        <input name="dbHost" type="text" class="form-control" id="db_host" required/>
                    </div>
                </div>

                <div class="form-group row">
                    <label for="port" class="col-sm-2 col-form-label">端口</label>
                    <div class="col-sm-10">
                        <input name="port" type="number" class="form-control" id="port" value="3306" required/>
                    </div>
                </div>

                <div class="form-group row">
                    <label for="db" class="col-sm-2 col-form-label">数据库</label>
                    <div class="col-sm-10">
                        <input name="db" type="text" class="form-control" id="db" required/>
                    </div>
                </div>

                <div class="form-group row">
                    <label for="table" class="col-sm-2 col-form-label">表</label>
                    <div class="col-sm-10">
                        <input name="table" type="text" class="form-control" id="table" placeholder="要生成类的表，多个表用(英文)逗号隔开" required/>
                    </div>
                </div>

                <div class="form-group row">
                    <label for="user" class="col-sm-2 col-form-label">用户</label>
                    <div class="col-sm-10">
                        <input name="user" type="text" class="form-control" id="user" required/>
                    </div>
                </div>

                <div class="form-group row">
                    <label for="passwd" class="col-sm-2 col-form-label">密码</label>
                    <div class="col-sm-10">
                        <input name="passwd" type="password" class="form-control" id="passwd" required/>
                    </div>
                </div>

                <div class="form-group row">
                    <label for="passwd" class="col-sm-2 col-form-label">表名-->实体名  映射规则</label>
                    <div class="form-check form-check-inline">
                        <input name="entityName2TableName" class="form-check-input" type="radio" id="inlineRadio1" value="true">
                        <label class="form-check-label" for="inlineRadio1">保持不变</label>
                    </div>
                    <div class="form-check form-check-inline">
                        <input name="entityName2TableName" class="form-check-input" type="radio" id="inlineRadio2" value="false" checked>
                        <label class="form-check-label" for="inlineRadio2">下划线-->驼峰</label>
                    </div>
                </div>

                <div class="form-group row">
                    <label for="passwd" class="col-sm-2 col-form-label">表字段名-->类属性名  映射规则</label>
                    <div class="form-check form-check-inline">
                        <input name="fieldName2AttrName" class="form-check-input" type="radio" id="inlineRadio3" value="true">
                        <label class="form-check-label" for="inlineRadio3">保持不变</label>
                    </div>
                    <div class="form-check form-check-inline">
                        <input name="fieldName2AttrName" class="form-check-input" type="radio" id="inlineRadio4" value="false" checked>
                        <label class="form-check-label" for="inlineRadio4">下划线-->驼峰</label>
                    </div>
                </div>

                <div class="form-group row">
                    <label for="passwd" class="col-sm-2 col-form-label">是否添加lombok注解</label>
                    <div class="form-check form-check-inline">
                        <input name="addLombok" class="form-check-input" type="radio" id="inlineRadio5" value="true" checked>
                        <label class="form-check-label" for="inlineRadio5">添加</label>
                    </div>
                    <div class="form-check form-check-inline">
                        <input name="addLombok" class="form-check-input" type="radio" id="inlineRadio6" value="false">
                        <label class="form-check-label" for="inlineRadio6">不添加</label>
                    </div>
                </div>

                <div class="form-group row">
                    <label for="passwd" class="col-sm-2 col-form-label">控制器是否使用@RestController</label>
                    <div class="form-check form-check-inline">
                        <input name="useRest" class="form-check-input" type="radio" id="inlineRadio7" value="true" checked>
                        <label class="form-check-label" for="inlineRadio7">使用</label>
                    </div>
                    <div class="form-check form-check-inline">
                        <input name="useRest" class="form-check-input" type="radio" id="inlineRadio8" value="false">
                        <label class="form-check-label" for="inlineRadio8">不使用</label>
                    </div>
                </div>

                <div class="form-group row">
                    <label for="passwd" class="col-sm-2 col-form-label">entity类上是否添加@TableName注解指定字段</label>
                    <div class="form-check form-check-inline">
                        <input name="entityAddTableNameAnno" class="form-check-input" type="radio" id="inlineRadio9" value="true" checked>
                        <label class="form-check-label" for="inlineRadio9">添加</label>
                    </div>
                    <div class="form-check form-check-inline">
                        <input name="entityAddTableNameAnno" class="form-check-input" type="radio" id="inlineRadio10" value="false">
                        <label class="form-check-label" for="inlineRadio10">不添加</label>
                    </div>
                </div>

                <div class="form-group row">
                    <label for="passwd" class="col-sm-2 col-form-label">是否添加swagger注解</label>
                    <div class="form-check form-check-inline">
                        <input name="useSwagger" class="form-check-input" type="radio" id="inlineRadio11" value="true" checked>
                        <label class="form-check-label" for="inlineRadio11">添加</label>
                    </div>
                    <div class="form-check form-check-inline">
                        <input name="useSwagger" class="form-check-input" type="radio" id="inlineRadio12" value="false">
                        <label class="form-check-label" for="inlineRadio12">不添加</label>
                    </div>
                </div>

                <div class="form-group row">
                    <label for="passwd" class="col-sm-2 col-form-label">是否添加mapper xml文件</label>
                    <div class="form-check form-check-inline">
                        <input name="geXml" class="form-check-input" type="radio" id="inlineRadio15" value="true">
                        <label class="form-check-label" for="inlineRadio15">生成</label>
                    </div>
                    <div class="form-check form-check-inline">
                        <input name="geXml" class="form-check-input" type="radio" id="inlineRadio16" value="false" checked>
                        <label class="form-check-label" for="inlineRadio16">不生成</label>
                    </div>
                </div>

                <div class="form-group row">
                    <label for="passwd" class="col-sm-2 col-form-label">若生成xml文件，在哪里生成mapper xml文件</label>
                    <div class="form-check form-check-inline">
                        <input name="whereMapperXml" class="form-check-input" type="radio" id="inlineRadio13" value="true" checked>
                        <label class="form-check-label" for="inlineRadio13">生成的mapper xml文件 和接口在同一个包中</label>
                    </div>
                    <div class="form-check form-check-inline">
                        <input name="whereMapperXml" class="form-check-input" type="radio" id="inlineRadio14" value="false">
                        <label class="form-check-label" for="inlineRadio14">生成的mapper xml文件 在resource 目录下</label>
                    </div>
                </div>

                <div class="form-group row">
                    <div class="col-sm-2">
                        <button type="submit" class="btn btn-primary">提交</button>
                    </div>
                    <div class="col-sm-2">
                        <button type="reset" class="btn btn-danger">重置</button>
                    </div>
                </div>
            </form>

        </div>
    </body>
</html>